import java.util.Scanner;

public class CalculatorTest {
    public static void main(String[] args) {
        Calculator o = new Calculator();
        Scanner in = new Scanner(System.in);
        System.out.println("1:加法 2：减法 3：乘法 4：除法 5:立方");
        int sr = in.nextInt();
        while (true) {
            System.out.println("请输入两个数");
            if (sr == 1) {
                double x = in.nextDouble();
                double y = in.nextDouble();
                double s = o.sum(x, y);
                System.out.println("和为：" + s);
            } else if (sr == 2) {
                double x = in.nextDouble();
                double y = in.nextDouble();
                double s = o.sum1(x, y);
                System.out.println("差为：" + s);
            } else if (sr == 3) {
                double x = in.nextDouble();
                double y = in.nextDouble();
                double s = o.sum2(x, y);
                System.out.println("乘为：" + s);
            } else if (sr == 4) {
                double x = in.nextDouble();
                double y = in.nextDouble();
                double s = o.sum3(x, y);
                System.out.println("商为：" + s);
            } else if (sr == 5) {
                double x = in.nextDouble();
                double s = o.sum4(x);
                System.out.println("立方为：" + s);

            } else {
                System.out.println("指令不存在");
            }
        }

    }
}
